package co.yixiang.mall.common.mall.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import co.yixiang.common.mproot.domain.BaseDomain;
import co.yixiang.mall.common.mall.dto.WechatUserDto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString
@TableName(value = "yx_system_store",autoResultMap = true)
public class YxSystemStore  extends BaseDomain {

    /** 用户id */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /** 用户账户(跟accout一样) */
    private String username;
    private String name;
    private String phone;

    /** 真实姓名 */
    private String address;

    private String image;

    private String latitude;
    private String longitude;

    private BigDecimal storeMoney;

    private Integer permit;

    private Integer auditStatus;

    private Integer retailType;

    public void copy(YxUser source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }

}
